<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>永嘉县工作目标管理责任制考核系统</title>
		<style type="text/css">
			#loading{
		        position:absolute;
		        left:40%;
		        top:40%;
		        padding:2px;
		        z-index:20001;
		        height:auto;
		    }
		    #loading a {
		        color:#225588;
		    }
		    #loading .loading-indicator{
		        background:white;
		        color:#444;
		        font:bold 13px tahoma,arial,helvetica;
		        padding:10px;
		        margin:0;
		        height:auto;
		    }
		    #loading-msg {
		        font: normal 10px arial,tahoma,sans-serif;
		    }
 		    .font_menu_a{
				color: black;
				font-size: 13px;
				font-weight: bold;
			}
		  	.font_menu_b{
				color: black;
				font-size: 12px;
				font-weight: normal;
			}
			#info {
				color: black;
				font-size: 12px;
				position:absolute;
		        right:10%; 
		        padding:2px;
		        height:24;
			}
		</style>
		<script type="text/javascript">
			var currentUser = '<s:property value="#session.user.userId"/>';
			var isLogin = '<s:property value="login"/>';
			if(isLogin != 'true' || currentUser == '' ){
				window.location = '/supervise/website/index.htm';
			}
		</script>
	</head>
	<body>
		<div id="loading">
			<div class="loading-indicator">
				<img src="/supervise/images/loading32.gif" width="31" height="31" style="margin-right:8px;float:left;vertical-align:top;" />
				永嘉县工作目标管理责任制考核系统
				<br />
				<span id="loading-msg">加载样式和图片...</span>
			</div>
		</div>
		<div id="bd">
			<link rel="stylesheet" type="text/css" media="all" href="/supervise/resources/css/ext-all.css" />
			<link rel="stylesheet" type="text/css" media="all" href="/supervise/css/index.css" />
			<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载核心...';</script>
			<script type="text/javascript" src="/supervise/adapter/ext/ext-base.js"></script>
			<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '加载UI组件...';</script>
			<script type="text/javascript" src="/supervise/ext-all.js"></script>
			<script type="text/javascript">document.getElementById('loading-msg').innerHTML = '模块初始化...';</script>
			<!--<script type="text/javascript" src="/supervise/js/RowExpander.js"></script>-->
			<script type="text/javascript" src="/supervise/locale/ext-lang-zh_CN.js"></script>
			<script language="javascript">
				var user = Ext.util.JSON.decode('<%= ((com.ez.supervise.model.dto.LoginUser)session.getAttribute("user")).toJsonString() %>');
			</script>
			<script type="text/javascript" src="/supervise/js/base.js"></script>
			<script type="text/javascript" src="/supervise/js/init.js"></script>
			<script type="text/javascript" src="/supervise/js/TreeCheckNodeUI.js"></script>
			<!--<script type="text/javascript" src="/supervise/js/ButtonColumn.js"></script>-->
			<!--<script type="text/javascript" src="/supervise/js/MultiComboBox.js"></script>-->
			<script type="text/javascript" src="/supervise/fckeditor/fckeditor.js"></script> 
			<script type="text/javascript" src="/supervise/js/ComboBoxTree.js"></script>
			<script type="text/javascript" src="/supervise/js/Ext.ux.form.FCKeditor.js"></script>
			<!--<script type="text/javascript" src="/supervise/ux/GroupHeaderPlugin.js"></script>-->
			<script type="text/javascript" src="/supervise/ux/RowExpander.js"></script>
			<script type="text/javascript" src="/supervise/js/sys-user.js"></script>
			<script type="text/javascript" src="/supervise/js/sys-org.js"></script>
			<script type="text/javascript" src="/supervise/js/permission.js"></script>
			<script type="text/javascript" src="/supervise/js/role.js"></script>
			<script type="text/javascript" src="/supervise/js/role-permission.js"></script>
			<script type="text/javascript" src="/supervise/js/user-role.js"></script>
			<script type="text/javascript" src="/supervise/js/notice.js"></script>
			<script type="text/javascript" src="/supervise/js/goal-category.js"></script>
			<script type="text/javascript" src="/supervise/js/democracy_checkman.js"></script>
			<script type="text/javascript" src="/supervise/js/democracy_score.js"></script>
			<script type="text/javascript" src="/supervise/js/democracy_goal.js"></script>
			<script type="text/javascript" src="/supervise/js/democracy_goal_setting.js"></script>
			<script type="text/javascript" src="/supervise/js/goal_detail.js"></script>
			<script type="text/javascript" src="/supervise/js/goal_detail_apply.js"></script>
			<script type="text/javascript" src="/supervise/js/goal_detail_audit.js"></script>
			
			<script type="text/javascript" src="/supervise/js/goal_self.js"></script>
			<script type="text/javascript" src="/supervise/js/goal_self_audit.js"></script>
			<script type="text/javascript" src="/supervise/js/message.js"></script>
			<script type="text/javascript" src="/supervise/js/org_check.js"></script>
			<script type="text/javascript" src="/supervise/js/org_check_self.js"></script>
			<script type="text/javascript" src="/supervise/js/org_democracy.js"></script>
			<script type="text/javascript" src="/supervise/js/query_result.js"></script>
			<script type="text/javascript" src="/supervise/js/query_goal_detail.js"></script>
			<script type="text/javascript" src="/supervise/js/org_check_setting.js"></script>
			<script type="text/javascript" src="/supervise/js/user_center.js"></script>
			<script type="text/javascript" src="/supervise/js/user_address.js"></script>
			<script type="text/javascript" src="/supervise/js/file.js"></script>
			<script type="text/javascript" src="/supervise/js/query_progress.js"></script>
			<script type="text/javascript" src="/supervise/js/query_result.js"></script>
			<script type="text/javascript" src="/supervise/js/query_democracy.js"></script>
			<script type="text/javascript" src="/supervise/js/statistic-check.js"></script>
			
			
 <script type="text/javascript"> 
 Ext.BLANK_IMAGE_URL = '/supervise/resources/images/default/s.gif';
Ext.QuickTips.init();
var start = {
	id : 'start-panel',
	title : '欢迎使用',
	layout : 'fit',
	bodyStyle : 'padding:25px',
	html : '<img src="/supervise/images/bg.jpg"/>'
};

var windIndex = 0;
Ext.onReady(function() {
	setTimeout(function() {
		Ext.get('loading').remove();
		Ext.getDom('header').style.visibility = 'visible';
		var vp = new Ext.Viewport({
			layout : 'border',
			defaults : {
				collapsible : true,
				split : true
			},
			items : [
			{
				// 头部分
				region : 'north',
				xtype : 'box',
				margins : '0 0 0 0',
				// html : '<img src="images/system/top.gif" width="100%"
				// height="100">',
				applyTo : 'header',
				height : 50,
				split : false
			}, {
				region : 'west',
				// title : currentUser,
				title : '系统菜单',
				id : 'accordion-panel',
				layout : 'border',
				margins : '2 0 5 5',
				width : 200,
				minSize : 150,
				maxSize : 300,
				bodyStyle : 'background-color:#DFE8F6',
				defaults : {
					border : false
				},
				bbar : [{
					text : '退出系统',
					iconCls : 'icon-delete',
					handler : function() {
						Ext.Msg.confirm('操作提示', '您确定要退出本系统?',
								function(btn) {
									if ('yes' == btn) {
									/**
										Ext.Ajax.request({
											url : '/supervise/sys/user/logout.action',
											success : function() {
												window.location.replace(window.location.href);
												location.replace('/supervise/sys/user/logout.action');
											},
											failure : function() {
												Ext.Msg.show({
													title : '错误提示',
													msg : '退出系统失败!',
													icon : Ext.Msg.ERROR,
													buttons : Ext.Msg.OK
												});
											}
										});
										**/
										window.location.replace(window.location.href);
										location.replace('/supervise/sys/user/logout.action');
									}
								});
							}
						}],
				items : [
<s:property value="#session.script"  escape="false"/>
						]},
			 {
				id : 'content-panel',
				region : 'center',
				layout : 'card',
				margins : '2 5 5 0',
				activeItem : 0,
				border : false,
				items : [start, p_user, p_org, p_permission, p_role, p_role_permission, p_userrole, p_cms,
					p_goalcategory, p_democracycheckman, p_democracyscore, p_democracygoal, p_goaldetail, p_goaldetailapply, p_goaldetailaudit,
					p_goalself, p_goalselfaudit, p_message,p_orgcheckself, p_orgcheck, p_orgdemocracy, p_orgchecksetting,
					p_user_address, p_file, p_progress, p_result, p_democracy, p_democracygoalsetting, p_statisticCheck]
			}]
		});
	}, 250);
});
// 添加一个TAB页，采用IFRAME嵌套
function addNewTab(nameId) {
	try {
		Ext.getCmp('content-panel').layout.setActiveItem(nameId.substring(0,
				nameId.indexOf('-'))
				+ '-panel');

	} catch (e) {
	}
}
function createTab(nameId) {
	// alert(nameId);
	try {
		var panelName = nameId.substring(0,nameId.indexOf('-'));
		if(panelName == 'password'){
			editPassword();
		} else if (panelName == 'help'){
			sysHelp();	
		} else if (panelName == 'info'){
			sysInfo();	
		} else {
			Ext.getCmp('content-panel').layout.setActiveItem(panelName + '-panel');
		}
	} catch (e) {
	}
}

function editPassword(){
	window_edit_password.show();
	if(user.userId){
		var frm = Ext.getCmp("form_edit_password").getForm();
		frm.findField('editUerId').setValue(user.userId);
	} else {
		
	}
}
function sysInfo(){
	sys_info.show();
}
function sysHelp(){
	sys_help.show();
}
</script> 
		</div>
		<div id="header">
			<h1>
				永嘉县工作目标管理责任制考核系统
			</h1>
			<div id="infoa">
				<table width="100%" height='28' border="0" cellspacing="0" cellpadding="2">
				  <tr>
				  	 <td width="60%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> 
				   	 <td width="40%" align="right" nowrap="nowrap" style="color:#FFFFFF;padding-right:5px">当前用户：<s:property value="#session.user.userName"/> &nbsp;&nbsp;&nbsp;&nbsp; 所属部门：<s:property value="#session.user.orgName"/></td>
				  </tr>
				</table> 
			</div>
		</div>
	</body>
</html>
